A. Field of the Invention
The present invention relates to a method and apparatus for adjusting the picture quality of a digital image display, especially to the method and apparatus for adjusting the picture quality of a liquid crystal display (LCD) in response to a requested degree of sharpness by providing a 3 order or 4 order interpolation function.
B. Description of the Prior Art
For digital display devices, such as Liquid Crystal Display (LCD), Digital Micro-mirror Device (DMD), plasma display, if their resolutions or image frame rates are different from that of the source image, then they will need an image scaler for interpolation and frame rate conversion. Image up-scaling or down-scaling means the change in the image resolution. For up-scaling an image, the position and gray levels of interpolated pixels must be computed and inserted to the position determined for the interpolated pixels. The newly interpolated pixels are closely related to their neighboring pixels. The relationship between an interpolated pixel and its neighboring pixels is represented by a weight to distance function. Such relationship is defined as an interpolation function. The newly interpolated pixels can be computed by a convolution computation based on the interpolation function and the sampling input pixels. Moreover, the picture qualities of the digital image are determined by the interpolation function applied thereto.
Refer to FIG. 1 for showing the structure of a control board of the LCD. It mainly includes a LCD monitor 11, an image scaler 12, and an Analog to Digital Converter 13. The Analog to Digital Converter 13 is for receiving the analog input data from a host computer and then converting it into digital image signals. In general, the gray levels of a pixel can be represented by 8 bits. The image scaler 12 is responsible for up-scaling or down-scaling the image size, and the frame rate conversion. The resultant interpolated image output is then shown on the LCD monitor 11.
Refer to FIG. 2 for illustrating the method for resizing a source image. When the image is scaled up, the input of the image scaler 12 is 8 pixels while output of the image scaler 12 will be 16 pixels. In that case, the positions of the input pixels 21 are not in one-to-one correspondence with the output pixels 22. Thus, the interpolated pixels must be inserted into the source image to provide a smooth continuity on the digital image output.
The technology of interpolation determines the picture quality of the digital image generated by the image scaler. Theoretically, the number of sampling input pixels and the orders of an interpolation function are proportional to the performance of the effects generated. However, in practice, the most commonly used method is to determine the interpolated pixel data based on 2 or 3 sampling input pixels.
Refer to FIG. 3 for showing a figure of the scaling factor based on three sampling input pixels. The gray levels of the interpolated pixel Y(x) can be computed from the A, B, C sampling input pixels. The gray levels of Y(x) can be obtained from the following interpolation function:
For xe2x88x920.5xe2x89xa6xxe2x89xa60.5,
Y(x)=F(x)xc3x97A+G(x)xc3x97B+(1xe2x88x92F(x)xe2x88x92G(x))xc3x97C;xe2x80x83xe2x80x83(1)
where
B represents the sampling input pixel closest to the interpolated position,
A and C represent the sampling input pixels on the left and right sides of B, x represents the position of the interpolated pixel relative to the position of B. And F(x) and G(x) are scaling functions for computing the scaling factors for the interpolation function.
There are two interpolation methods most commonly used in the arts, namely, Linear Interpolation method and Near Neighborhood method. The figure of the scaling factor following Near Neighborhood method is illustrated in FIG. 4. The scaling factors can be obtained by the following equation:
For xe2x88x920.5xe2x89xa6xxe2x89xa60.5,
F(x)=0;
G(x)=1.
The advantage of the Near Neighboring method is that the contrast of the image is pleasing and the circuit design following the Near Neighboring method is simple. However, its disadvantage is that the interpolated image output cannot be scaled up evenly.
For comparison, the figure of the scaling factor F(x), G(x) according to Linear Interpolation method is illustrated in FIG. 5. The scaling factors of F(x), G(x) can be obtained by:
For xe2x88x920.5xe2x89xa6xxe2x89xa60,
G(x)=1+x;
F(x)=xe2x88x92x.
For 0xe2x89xa6xxe2x89xa60.5,
G(x)=1xe2x88x92x,
F(x)=0.
In general, the picture quality generated by Linear Interpolation method is better than that of Near Neighborhood method. The interpolated image output can be scaled up evenly. However, for the images with strong contrast, such as text, the boundary of the image will be blurred if interpolated following the Linear Interpolation method.
Thus, it is a critical issue for the technology of the image scaler about how to maintain the picture quality of an image after resizing, and how to simplify the circuit design for the interpolation function in hardware/firmware. Moreover, the conventional LCD monitor does not provide functions for adjusting the degree of sharpness. It is desirable to provide a function for users to manually adjust the degree of sharpness of the source image.
Accordingly, it is an object of the present invention to provide a method and apparatus for adjusting the picture quality of a digital image by dynamically adjusting a weight coefficient required for the 3 order or 4 order interpolation functions derived by the present invention. Consequently, the sharpness of the image can be flexibly adjusted. The circuitry design can also be simplified, thereby to reduce the manufacturing cost.
In an aspect of the present invention, the apparatus of the present invention mainly includes: a control interface, a control unit, a vertical interpolation computation module, and a horizontal interpolation module. The control interface generates an adjusting signal in response to a requested degree of sharpness. The vertical interpolation computation module and the horizontal interpolation module are implemented according to an interpolation function derived by the present invention. The control unit comprises a lookup table built according to the scaling functions of the present invention. The lookup table stores pre-calculated vertical scaling factors and horizontal scaling factors of an interpolated function defined by Y(x)=F(x)xc3x97(Axe2x88x92C)+G(x)xc3x97(Bxe2x88x92C)+C. The scaling functions F(x) and G(x) are defined by F(x)=ax3+x2xe2x88x92(2+a)xc3x97x/4, G(x)=xe2x88x922x2+1 for a 3 order interpolation function. The vertical interpolation computation module computes the interpolated pixel data from three sampling input pixels according to the scaling factors output of the control unit. After the vertical interpolation procedure is finished, the resultant image data is sent to the horizontal interpolation module. Then, the horizontal interpolation module computes the interpolated pixel data on the resultant image output data after vertical interpolation according to the scaling factors output from the control unit. After completing the horizontal interpolation, the interpolated image data will be shown on the digital image display.
Another aspect of the present invention provides a method for adjusting the picture quality of the digital display device. The method includes the following steps: first, establish a lookup table for storing pre-calculated vertical scaling factors and horizontal scaling factors of an interpolation function defined by Y(x)=F(x)xc3x97(Axe2x88x92C)+G(x)xc3x97(Bxe2x88x92C)+C. The scaling functions F(x) and G(x) are defined by F(x)=ax3+x2xe2x88x92(2+a)xc3x97x/4, and G(x)=xe2x88x922x2+1 respectively for 3 order scaling functions. The scaling functions F(x) and G(x) can also be substituted by a 4 order scaling function:
F(x)=(2axe2x88x924)x4+(1xe2x88x92a)x3+(2xe2x88x92a/2)x2+(axe2x88x923)/4;
and
G(x)=xe2x88x924(axe2x88x922)x4+(axe2x88x924)x2.
Then, select a desired degree of sharpness and generate a weight coefficient a in response to the desired degree of sharpness. After that, determine a vertical scaling factor and a horizontal scaling factor by looking up the lookup table in response to the weight coefficient a. Then, calculate a vertical interpolated pixel data based on every three sampling input pixels from a source image according to the vertical scaling factor and generate a vertical interpolated image output. And after that, calculate a horizontal interpolated pixel data on the vertical interpolated image output and generate a resultant interpolated image output according to the horizontal scaling factor. Finally, display the resultant horizontal interpolated image output after the source image has been completely interpolated.